<?php

//防止恶意调用
if (!defined('IN_MOD'))
{
    die('Hacking attempt');
}

// 用户点赞
if($configinfo['ajaxname'] == 'awesome')
{
	$result = ajax_userclickaction("modulepara_user_action_log");
	$modulewhere=array();
	$modulewhere['fielddata'] = 'article_likenum_v=article_likenum_v+1';
	$modulewhere['where'] = "id='".$result['ajaxid']."'";
	$modulewhere['moduleid'] = 100;
	$updateinfo = ajax_updatemodule($modulewhere);
	$result['content']['total'] = $updateinfo['content']['article_likenum_v'];
	
	echo json_encode($result);
	die;exit;
}

// 删除点赞
if($configinfo['ajaxname'] == 'delawesome')
{
	$result = ajax_delclickaction("modulepara_user_action_log");
	
	$modulewhere=array();
	$modulewhere['fielddata'] = 'article_likenum_v=article_likenum_v-1';
	$modulewhere['where'] = "id='".$result['ajaxid']."'";
	$modulewhere['moduleid'] = 100;
	$updateinfo = ajax_updatemodule($modulewhere);
	$result['content']['total'] = $updateinfo['content']['article_likenum_v'];
	
	echo json_encode($result);
	die;exit;
}

?>